<div>
<br/><br/>
<form method="post" action="db.php">
	Title<br/>
	<?php 
	$titleVal = "";
	$descVal = "";
	if($_GET['edit']==1){
		$wyniki = $base->pobierzTabliceWynikow("select * from entry where id=".$_GET['id']);
		
		foreach ($wyniki as $wynik){
			$titleVal = $wynik['TITLE'];
			$descVal = $wynik['DESCRIPTION'];
		}
	}
	?>
	<input id="titleField" type="text" name="title" <?php echo "value=\"".$titleVal."\"";?>/>
	<br/><br/>
	Content<br/>
	<input type="hidden" value="<?php echo $_GET['edit'];?>" name="edit" />
	<input type="hidden" value="<?php echo $_GET['id'];?>" name="id" />
	<textarea rows="6" cols="40" id="contentField" name="desc"><?php echo $descVal;?></textarea><br/>
	<input type="submit" value="Dodaj" />
</form>
</div>